package com.aspose.cells;

class zbsb {
   static double a(double var0, double var2) {
      double var4 = zabx.b((var2 + 1.0D) / 2.0D) / Math.sqrt(var2 * 3.141592653589793D) / zabx.b(var2 / 2.0D);
      double var6 = Math.pow(1.0D + var0 * var0 / var2, -(var2 + 1.0D) / 2.0D);
      return var4 * var6;
   }

   public static double a(double var0, double var2, int var4) {
      if (var2 >= 1.0D && var4 <= 2 && var4 >= 1 && var0 >= 0.0D) {
         try {
            zakm var7 = new zakm(var2);
            double var5;
            if (var0 < 5.0D) {
               var5 = var7.a(0.0D, var0, 1.0E-20D);
               var5 = 0.5D - var5;
               return var5 * (double)var4;
            } else {
               var5 = var7.a(0.0D, 5.0D, 1.0E-20D) + var7.a(5.0D, var0, 1.0E-20D);
               var5 = 0.5D - var5;
               return var5 * (double)var4;
            }
         } catch (Exception var8) {
            return Double.NaN;
         }
      } else {
         return Double.NaN;
      }
   }
}
